package service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import dao.impl.UserDaoImpl;
import pojo.User;
import service.UserManager;

@Service(value="userManager")
public class UserManagerImpl2 implements UserManager{
	@Resource(name="userDao")
	private UserDaoImpl userDao;

	@Override
	public User addUser(User user) {
		User u = userDao.addUser(user);
		return u;
	}

	@Override
	public int deleteUser(String id) {
		int m=userDao.deleteUser(id);
		return m;
	}

	@Override
	public int updateUser(User user) {
		int m=userDao.updateUser(user);
		return m;
	}

	@Override
	public List<User> findAll() {
		List<User> users = userDao.findAll();
		return users;
	}

}
